package com.qys.livesMall.kafka.entity.log;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * Created by IntelliJ IDEA.
 * User: dp
 * Date: 2023/06/06
 * Time: 9:16
 * DESCRIPTION: 后台日志记录
 */
@Data
public class SystemLog implements Serializable {

    @Serial
    private static final long serialVersionUID = 42L;


    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+0")
    private LocalDateTime recordTime;

    /**
     * 操作方法
     */
    private String name;

    /**
     * 操作人
     */
    private String userName;

    /**
     * 操作数据
     */
    private Object beforeData;

    /**
     * 操作数据
     */
    private Object afterData;

    /**
     * 异常信息
     */
    private Object ex;

    /**
     * 路径
     */
    private String url;

    /**
     * 接口耗时
     */
    private Long time;
}
